package net.wangds.auth.module.impls.defaults;

import lombok.Getter;
import lombok.Setter;
import net.wangds.auth.module.User;
import net.wangds.auth.module.UserStatusEnum;
import net.wangds.data.impl.IdCreate;

import javax.persistence.*;
import java.util.List;

@MappedSuperclass
public class DefaultAccount extends IdCreate implements net.wangds.auth.module.Account {
    private static final long serialVersionUID = 0;
    /**
     * 登录名.
     */
    @Getter
    @Setter
    @Column(length = 200)
    private String loginname;

    @Getter
    @Setter
    @Column(length = 50)
    private String displayName;

    /**
     * 密码.
     */
    @Getter
    @Setter
    @Column(length = 256)
    private String password;

    /**
     * 状态.
     */
    @Getter
    @Setter
    @Enumerated(EnumType.ORDINAL)
    @Column()
    private UserStatusEnum status=UserStatusEnum.NORMAL;

    /**
     * 昵称.
     */
    @Getter
    @Setter
    @Column(length = 50)
    private String nickname;

    /**
     * 头像.
     */
    @Getter
    @Setter
    @Column(length = 2000)
    private String avatar;

    /**
     * 用户.
     */
    @Getter
    @Setter
    @Transient
    private List<User> users;

    @Getter
    @Setter
    @Column(length = 128)
    private String wxOpenId;

    @Getter
    @Setter
    @Column(length = 128)
    private String wxUnionId;



}
